# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=shellcode-factory
pkgver=96.07ae857
pkgrel=4
pkgdesc='Tool to create and test shellcodes from custom assembly sources.'
groups=('blackarch' 'blackarch-exploitation')
arch=('x86_64' 'aarch64')
url='https://github.com/danielhenrymantilla/shellcode-factory'
license=('MIT')
depends=('gdb' 'nano' 'binutils' 'python2')
makedepends=('git')
source=("git+https://github.com/danielhenrymantilla/$pkgname.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

package() {
  cd $pkgname

  install -dm 755 "$pkgdir/usr/share/$pkgname"

  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md
  install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"

  rm LICENSE README.md

  cp -a * "$pkgdir/usr/share/$pkgname/"
}

